Version 3.0
User's Guide

Installing NetCloak

Previous | Next
Contents

Installing NetCloak requires several steps, many of which are different depending on which Web server you are using. The following sections provide an overview of the process, then specific instructions for several popular Mac OS Web servers. If you are already comfortable with configuring your Web server to use CGI or plug-in extensions you'll find NetCloak simple to install. Even if you are familiar with configuring actions, we suggest you skim this chapter for specific procedures and options unique to NetCloak.

If you have already installed the NetCloak Introduction, you may be thinking that you do not need to do any further installation. The Introduction is designed to provide a simple and relatively fool-proof setup, making it as easy as possible to see NetCloak in action. However, it is far from the optimal configuration for most Web servers. Installing NetCloak for permanent use on your Web server according to the instructions here is well worth the extra effort. This way NetCloak will always process your pages so the NetCloak commands in them will always work.

An Overview Of Suffix Mappings And Actions

Each of the HTML pages you create using NetCloak commands must be processed by NetCloak, or "cloaked". Most Web servers in use today make use of "suffix mappings" and "actions", which greatly simplifies using NetCloak (and many other server add-on tools) on your server.

An action is configured in the Web server, and defines a method for handling a request. Most servers have built-in actions for "TEXT", which tells the server to return the requested file as text (ASCII) data, and "BINARY", which tells the server to send binary data. Servers also allow you to define your own actions which tell the server to hand off the request to a plug-in module or an external CGI instead of just sending the requested file.

A file suffix is the last few characters of the filename, and begins with a period. File suffixes are normally used to denote what type of information is contained in a file, such as HTML text or a GIF image. Common suffixes include: ".html", ".gif", and ".jpeg". A "suffix mapping" establishes a relationship between files with a particular suffix and a particular action to be taken. For example, you can configure your Web server to use NetCloak as an action to process all files with the suffix ".html".

Exactly how you define suffix mappings and the action to be taken varies from server to server. Basic instructions for several different servers are included in the following sections. For detailed information on configuring suffix mappings, see the documentation that came with your server.

No matter what server you are using, we suggest that you take the time to configure at least one suffix that uses NetCloak to process files. Remember that any page that you use NetCloak extension commands in will need to be named with the appropriate filename suffix. For example, if you define a suffix mapping of ".nclk" for NetCloak processing, any page that includes NetCloak commands must have a filename ending in ".nclk".

Installing NetCloak

To install NetCloak, you must first choose the CGI or plug-in version, then place NetCloak and its associated files in the appropriate places on your server. You may also need to launch NetCloak and select a root folder. Finally, you must create a suffix mapping and an associated action to call NetCloak when pages are requested from your server. For most servers, you will also need to set the names of the default, error and no access files to match the Web server.

Because NetCloak requires very little overhead, most Webmasters that use NetCloak simply make NetCloak the action responsible for processing pages with the suffix ".html". Since all of your HTML pages most likely end in ".html" already, this will allow you to use NetCloak in any of your HTML pages without worrying about whether the page is cloaked or not.

Choosing the Plug-In or CGI Version of NetCloak

NetCloak includes two versions: a Common Gateway Interface (CGI) application, and a Plug-In. If your Web server supports the WebStar API standard for Web server plug-ins, we strongly recommend that you use the NetCloak Plug-In for the best results. Servers that support the WebSTAR API ("W*API") include WebSTAR 1.3 or later, Quid Pro Quo 2.0 or later, AppleShare IP 5.0.2 or later, WebTen 1.1.1 or later, and TeleFinder 5.6 or later.

NetCloak imposes almost zero overhead when running as a Plug-In, ensuring peak performance from your Web server. With a correctly configured MIME mapping, NetCloak will process all of your pages automatically so you can use NetCloak commands in any of your pages.

The NetCloak CGI is not as fast as the plug-in, but is compatible with Web servers such as Mac OS 8's Web Sharing that do not support WebSTAR API Plug-Ins.

Installing NetCloak and Its Associated Files

The location of the NetCloak application or plug-in and the NetCloak support files is dependent on the Web server application you are using. The CGI version of NetCloak is normally installed in the Web server root folder or "cgi-bin" folder. If the NetCloak CGI application is in a folder other than the Web server root folder, you will need to launch NetCloak and select the root folder on the Files tab of the NetCloak Configuration window. The "NetCloak Files" folder, containing NetCloak's preferences, macros and other support files must be in the same folder as the NetCloak application.

If you are installing the NetCloak plug-in, the NetCloak Plug-In file must go in the Web server's plug-ins folder. This folder is normally named "Plug-Ins" and is usually located in the Web server root folder. The "NetCloak Files" folder must be placed in the folder containing the actual Web server application. The location of the "NetCloak Files" folder used by the plug-in varies according to which Web server you use - see the instructions below specific to yourWeb server.

Creating Actions and Suffix Mappings

While it is possible to use NetCloak without defining an action or suffix mapping, most users configure the Web server so that it calls NetCloak to process all HTML files. This will allow you to use NetCloak in any of your HTML pages without worrying about whether the page is cloaked or not.

Most Web servers define actions and suffix mappings separately. WebSTAR, Quid Pro Quo and WebTen work this way, so you must first define an action which calls NetCloak, then assign that action to selected suffixes by defining suffix mappings (sometimes called "MIME mappings" or "MIME extensions"). The NetCloak plug-in will automatically define an action for itself named "CLOAK_PI", so if you are installing the plug-in you only need to worry about creating an appropriate suffix mapping.

Some Web servers define actions and suffix mappings together. AppleShare IP defines MIME mappings which include both a file suffix and the method for handling requests for that file type. The Web Sharing control panel defines actions which are similar to AppleShare IP's MIME mappings.

For servers like WebSTAR 3, WebTen, and Quid Pro Quo which support multiple virtual-hosted or multihomed Web sites served by a single server, you may need to define actions and suffix mappings for each site separately.

Setting Default, Error and No Access Filenames

When a user requests a file which does not exist, or the user has insufficient privileges to access a file, Web servers return some sort of error page. Similarly, when a user makes a request with a file path but no filename, Web servers return a predefined "default" or "index" page.

When NetCloak handles such a request, it must perform the same function. NetCloak uses HTML files for the error, no -access and default pages, so it must be configured with the names of these files. By default, these are named "error.html", "noaccess.html" and "default.html", respectively. For servers that also use HTML files, NetCloak should be configured to use the same files as the server. If you have a server such as AppleShare IP or Web Sharing which do not use HTML files for these pages, you will need to create them and configure NetCloak with the filenames.

Some Web servers (such as WebTen) and WebSTAR plug-ins (such as Clearway Technologies' FireSite) allow you to specify more than one filename for the default page. NetCloak does not support multiple names for the default page, so you should configure it to use the first or most common default filename.

Proceed to the specific installation instructions for your web server software:

Installing NetCloak with Other Web Servers

If you use Web server software that is not listed, please consult your Web server's documentation for information on configuring it for use with NetCloak. In particular, check for support for WebSTAR API plug-ins, and look for information about setting up file "suffix mappings" and creating "actions" or "action handlers".

The NetCloak plug-in automatically registers an action called "CLOAK_PI", and registers a suffix mapping which maps the ".nclk" file suffix to the "CLOAK_PI" action. You should also be able to modify the suffix mapping for ".html" files so that they are handled by the "CLOAK_PI" action (and thus the NetCloak plug-in).

The NetCloak CGI must be configured manually. You should create an action named "CLOAK" that defines a path to "NetCloak.acgi" as its handler, and then create a suffix mapping that maps the suffix ".nclk" (and optionally ".html") to the NetCloak action.

Uninstalling NetCloak

Once you have created a suffix mapping to use NetCloak, your server will always send files with that suffix through NetCloak. If you remove NetCloak, an error will result unless you reset the suffix mapping. If you are using WebSTAR, you can use the Auto-Map menu command ".HTML files to BINARY Action" or ".NCLK files to BINARY Action" to easily reset these suffix mappings.

If you are using a Web server other than WebSTAR, you will need to manually remove the suffix mapping. See your Web server documentation for instructions on editing suffix mappings and default suffix mappings. If you manually created a suffix mapping for a suffix other than .html or .nclk, then you will need to manually reset it.


Copyright © 1996-1999 Maxum Development Corporation

http://www.maxum.com/
Previous | Next
Contents